package cn.zhangxinyu.org.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

//可以直接提供所需要的方法
@Data
public class Department {
   //主键
    private Long id;
    //说明
    private String sn;
    //名字
    private String name;
    //部门层级路径
    private String dirPath;
    //部门状态（0：启用，-1：禁用）
    private Integer state;
    //部门经理
    private Employee manager;
    //父部门
   private Department parent;
   //子部门
   private List<Department> children = new ArrayList<>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDirPath() {
        return dirPath;
    }

    public void setDirPath(String dirPath) {
        this.dirPath = dirPath;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Employee getManager() {
        return manager;
    }

    public void setManager(Employee manager) {
        this.manager = manager;
    }

    public Department getParent() {
        return parent;
    }

    public void setParent(Department parent) {
        this.parent = parent;
    }

    public List<Department> getChildren() {
        return children;
    }

    public void setChildren(List<Department> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "Department{" +
                "id=" + id +
                ", sn='" + sn + '\'' +
                ", name='" + name + '\'' +
                ", dirPath='" + dirPath + '\'' +
                ", state=" + state +
                ", manager=" + manager +
                ", parent=" + parent +
                ", children=" + children +
                '}';
    }
}
